﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using APPLICATION.DataAccess.TimsDSTableAdapters;

namespace APPLICATION.DataAccess
{
    class dbAny
    {
        public DataTable dtAny(int hrclvl,int DCode)
        {
            #region old code

            /*
                SqlConnection connection = new SqlConnection(globals.APPCONNSTRING);

                SqlCommand command = new SqlCommand();
                command.Connection = connection;

                command.CommandText = "fn_GetAny";
                command.CommandType = CommandType.Text;

                command.Parameters.Add("@hrclvl", SqlDbType.Int).Value = hrclvl;        // ActionID insert update delete
                command.Parameters.Add("@DCode",  SqlDbType.Int).Value = DCode;

                SqlDataAdapter dtAny = new SqlDataAdapter(command);
                DataTable dt = new DataTable("dsAny");

                connection.Open();
                dtAny.Fill(dt);

                try
                {
                 
                }
                catch (Exception ex)
                {

                }

                connection.Close();

                return dt;
             */

        #endregion


            DataAccess.TimsDSTableAdapters.fn_GetAnyTableAdapter dtAny = new fn_GetAnyTableAdapter();
            return dtAny.GetData(hrclvl, DCode);
            
        }
    }
}
